<?php
namespace Home\Controller;
use Think\Controller;
class CommonController extends Controller {
    
    //ajax 返回数据，$code 编号正确为1，错误未0，$msg返回内容
    //返回json串
    public function ajaxReturn($code,$msg){
        $return = array();
        $return["code"] = $code;
        $return["msg"] = $msg;
        echo json_encode($return);
        exit;
    }
}